<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

class FeedbackModel extends AbstractBaseModel
{
    protected $table = 'feedback';
    protected $casts = [
        'feed_pic' => 'json',
    ];
    /**
     * 职位信息
     * @return HasOne
     */
    public function jobPositionInfo(): HasOne
    {
        return $this->HasOne(JobpositionModel::class, 'id', 'job_position_id');
    }

    /**
     * 关联模式
     * @return BelongsTo
     */
    public function userInfo():BelongsTo
    {
        return $this->belongsTo(User::class, 'user_id');
    }


}
